-
-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR] Support replays for crashes in buffer and session modes #3609
Merged
romtsn
merged 10 commits into
rz/feat/session-replay-anrs
from
rz/feat/session-replay-crashes
Jul 30, 2024
Merged
[SR] Support replays for crashes in buffer and session modes #3609
romtsn
merged 10 commits into
rz/feat/session-replay-anrs
from
rz/feat/session-replay-crashes
Jul 30, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
c08178b | 463.49 ms | 521.56 ms | 58.07 ms |
67eeea2 | 418.83 ms | 468.14 ms | 49.31 ms |
cde588a | 434.92 ms | 521.49 ms | 86.57 ms |
1a9eb03 | 380.06 ms | 449.65 ms | 69.59 ms |
80061b7 | 395.55 ms | 462.64 ms | 67.09 ms |
11e9a81 | 384.38 ms | 469.45 ms | 85.07 ms |
eb8377e | 325.29 ms | 378.86 ms | 53.57 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
c08178b | 1.70 MiB | 2.34 MiB | 657.87 KiB |
67eeea2 | 1.70 MiB | 2.34 MiB | 657.87 KiB |
cde588a | 1.70 MiB | 2.34 MiB | 658.00 KiB |
1a9eb03 | 1.70 MiB | 2.34 MiB | 657.61 KiB |
80061b7 | 1.70 MiB | 2.34 MiB | 658.13 KiB |
11e9a81 | 1.70 MiB | 2.34 MiB | 658.20 KiB |
eb8377e | 1.70 MiB | 2.34 MiB | 658.10 KiB |
Previous results on branch: rz/feat/session-replay-crashes
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f92f141 | 409.55 ms | 490.19 ms | 80.65 ms |
828b30b | 446.63 ms | 539.67 ms | 93.04 ms |
2e2a18e | 543.10 ms | 617.62 ms | 74.52 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f92f141 | 1.70 MiB | 2.34 MiB | 659.63 KiB |
828b30b | 1.70 MiB | 2.35 MiB | 660.25 KiB |
2e2a18e | 1.70 MiB | 2.34 MiB | 659.62 KiB |
markushi
approved these changes
Jul 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, great to see this all coming together. Left a few minor comments
sentry-android-core/src/main/java/io/sentry/android/core/AnrV2EventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/AnrV2EventProcessor.java
Outdated
Show resolved
Hide resolved
sentry-android-replay/src/main/java/io/sentry/android/replay/ReplayIntegration.kt
Outdated
Show resolved
Hide resolved
sentry-android-replay/src/main/java/io/sentry/android/replay/capture/BufferCaptureStrategy.kt
Outdated
Show resolved
Hide resolved
sentry-android-replay/src/main/java/io/sentry/android/replay/capture/CaptureStrategy.kt
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#skip-changelog
📜 Description
replayId
to scope until an error happens (and in the case of an ANR we don't know until next restart), the persistedreplayId
to disk might be irrelevant. So we have to iterate through the leftover replay folders and find the one that was last modified closest to the ANR and take it as the previous replayreplayId
back to the disk cache, so laterReplayIntegration
can pick it up and finalize and send it. The order will be ensured by an integration testsendReplayForEvent
tocaptureReplay
which just accept one argument now to define whether the app process is terminating or not. If it is, then we don't capture the buffered replay in the current process, but will capture it on next launch, to avoid weird issues with half-captured videoscreateSegment
method and moved it to a static method underCaptureStrategy
so we could call it fromReplayIntegration
as well💡 Motivation and Context
Part of getsentry/sentry#74441
💚 How did you test it?
manually + automated
📝 Checklist
sendDefaultPII
is enabled.